<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>视频播放</title>
    <link href="static/plugins/videojs/video-js.css" rel="stylesheet">
</head>
<body>
<video id=example-video width=800 height=600 class="video-js vjs-default-skin vjs-big-play-centered" controls poster="http://127.0.0.1:90/video/add.jpg">
    <source
            src="https://1908aoss.oss-cn-qingdao.aliyuncs.com/video/c/5/c5c75d70f382e6016d2f506d134eee11/c5c75d70f382e6016d2f506d134eee11.avi"
            type="application/x-mpegURL">
</video>
<input type="button" onClick="switchvideo()" value="switch"/>

<script src="static/plugins/videojs/video.js"></script>
<script src="static/plugins/videojs/videojs-contrib-hls.js"></script>
<script>
  // eslint-disable-next-line no-undef
    var player = videojs('example-video')
    // player.play();

  // eslint-disable-next-line no-unused-vars
    function switchvideo () {
      player.src({
        src: 'https://1908aoss.oss-cn-qingdao.aliyuncs.com/video/c/5/c5c75d70f382e6016d2f506d134eee11/c5c75d70f382e6016d2f506d134eee11.avi',
        type: 'application/x-mpegURL',
        withCredentials: true
      })
      player.play()
    }
</script>

</body>
</html>
